<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [10,20,30,40];
        console.log(arr[0]); // 10
        console.log(arr[1]); // 20

        arr[0] = 50;
        console.log(arr[0]);

        console.log(arr.length);

        arr[arr.length] = 100;
        console.log(arr);

        arr[10] = 60;
        arr[arr.length] = 'hello'
        arr[arr.length] = true
        console.log(arr);
    </script>
</body>
</html>